home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / samba.idb / usr / samba / src / packaging / Caldera / smb.init.z / smb.init
Encoding:
Text File  |  1998-10-28  |  584 b   |  36 lines

  1. #!/bin/sh
  2.  
  3. # Source function library.
  4. . /etc/rc.d/init.d/functions
  5.  
  6. # Source networking configuration.
  7. . /etc/sysconfig/network
  8.  
  9. # Check that networking is up.
  10. [ ${NETWORKING} = "no" ] && exit 0
  11.  
  12. # Check smb.conf file exists.
  13. [ -f /etc/smb.conf ] || exit 0
  14.  
  15. # See how we were called.
  16. case "$1" in
  17.   start)
  18.     echo -n "Starting SMB services: "
  19.     daemon smbd -D     
  20.     daemon nmbd -D 
  21.     echo
  22.     touch /var/lock/subsys/smb
  23.     ;;
  24.   stop)
  25.     echo -n "Shutting down SMB services: "
  26.     killproc smbd
  27.     killproc nmbd
  28.     rm -f /var/lock/subsys/smb
  29.     echo ""
  30.     ;;
  31.   *)
  32.     echo "Usage: smb {start|stop}"
  33.     exit 1
  34. esac
  35.  
  36.